package com.choose.seat.modules.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName cinema_user_seat_log
 */
@TableName(value ="cinema_user_seat_log")
@Data
public class CinemaUserSeatLog implements Serializable {
    /**
     * 
     */
    @TableId(value = "cinema_user_seat_id")
    private Integer cinema_user_seat_id;

    /**
     * 用户表的主键
     */
    @TableField(value = "cinema_user_id")
    private Integer cinema_user_id;

    /**
     * 用户表的用户姓名，做冗余字段，减少关联查询
     */
    @TableField(value = "cinema_user_name")
    private String cinema_user_name;

    /**
     * 用户表的微信ID
     */
    @TableField(value = "cinema_wechat_id")
    private Integer cinema_wechat_id;

    /**
     * 座位表的主键
     */
    @TableField(value = "cinema_seat_id")
    private Integer cinema_seat_id;

    /**
     * 用户选座记录的座位图
     */
    @TableField(value = "seatXY")
    private String seatXY;

    /**
     * 创建人
     */
    @TableField(value = "createPerson")
    private String createPerson;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "updatePerson")
    private String updatePerson;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 逻辑删除标志，1是删除，0是未删除
     */
    @TableField(value = "isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CinemaUserSeatLog other = (CinemaUserSeatLog) that;
        return (this.getCinema_user_seat_id() == null ? other.getCinema_user_seat_id() == null : this.getCinema_user_seat_id().equals(other.getCinema_user_seat_id()))
            && (this.getCinema_user_id() == null ? other.getCinema_user_id() == null : this.getCinema_user_id().equals(other.getCinema_user_id()))
            && (this.getCinema_user_name() == null ? other.getCinema_user_name() == null : this.getCinema_user_name().equals(other.getCinema_user_name()))
            && (this.getCinema_wechat_id() == null ? other.getCinema_wechat_id() == null : this.getCinema_wechat_id().equals(other.getCinema_wechat_id()))
            && (this.getCinema_seat_id() == null ? other.getCinema_seat_id() == null : this.getCinema_seat_id().equals(other.getCinema_seat_id()))
            && (this.getSeatXY() == null ? other.getSeatXY() == null : this.getSeatXY().equals(other.getSeatXY()))
            && (this.getCreatePerson() == null ? other.getCreatePerson() == null : this.getCreatePerson().equals(other.getCreatePerson()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCinema_user_seat_id() == null) ? 0 : getCinema_user_seat_id().hashCode());
        result = prime * result + ((getCinema_user_id() == null) ? 0 : getCinema_user_id().hashCode());
        result = prime * result + ((getCinema_user_name() == null) ? 0 : getCinema_user_name().hashCode());
        result = prime * result + ((getCinema_wechat_id() == null) ? 0 : getCinema_wechat_id().hashCode());
        result = prime * result + ((getCinema_seat_id() == null) ? 0 : getCinema_seat_id().hashCode());
        result = prime * result + ((getSeatXY() == null) ? 0 : getSeatXY().hashCode());
        result = prime * result + ((getCreatePerson() == null) ? 0 : getCreatePerson().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cinema_user_seat_id=").append(cinema_user_seat_id);
        sb.append(", cinema_user_id=").append(cinema_user_id);
        sb.append(", cinema_user_name=").append(cinema_user_name);
        sb.append(", cinema_wechat_id=").append(cinema_wechat_id);
        sb.append(", cinema_seat_id=").append(cinema_seat_id);
        sb.append(", seatXY=").append(seatXY);
        sb.append(", createPerson=").append(createPerson);
        sb.append(", createTime=").append(createTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}